package com.mlf.factory.factory.spring;

import com.mlf.factory.easyFactory.demo.Shape;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

// 2. 声明工厂Bean
@Configuration
public class FactoryConfig {
   @Bean
   public FactoryBean<Shape> circle() { // 注意返回FactoryBean类型
       return new CircleFactoryBean();
   }
}
